feat: integrate vite devtools - #226
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Amazing @arashsheyda Now I would only keep Markdown & AST as tabs (not sure the others are useful) So we have only one view |
|
@atinux working on the syntax highlighting rn! one thing that we changed (from the initial work) is |
|
@arashsheyda I moved Angular docs changes to #247 and merge original PR, feel free merge main into this PR and update for Angular. |
|
@farnabaz I've updated the PR and docs and I believe it should be ready for final review 🤩
|
comark
@comark/angular
@comark/ansi
@comark/html
@comark/nuxt
@comark/react
@comark/svelte
@comark/vue
commit: |
| ".": "./dist/index.js", | ||
| "./vite": "./dist/devtools/vite.js", | ||
| "./devtools": "./dist/devtools/index.js", | ||
| "./devtools-renderer": "./dist/devtools/renderer/index.js", |
There was a problem hiding this comment.
| "./devtools-renderer": "./dist/devtools/renderer/index.js", | |
| "./devtools": "./dist/devtools/index.js", | |
| "./devtools/*": "./dist/devtools/*.js" |
The more I this, the more I come to this idea that we need to move vite export under dev tools.
I would like this:
/src/devtools
- index.ts (/devtools)
- vite.ts (/vite)
- renderer.ts (/renderer)
- uitls (reso of internal stuff)
Having simpler export al so allows use to re-export /devtool from other packages
"./devtools": "./dist/devtools/index.js",
"./devtools/*": "./dist/devtools/*.js"
|
@farnabaz would you mind do a final check ❤️ |
Move Vite DevTools UI out of comark into @comark/devtools (pkg.pr.new @b168cd3). Soft-load it from @comark/vue/vite and point examples/docs at the external package.
|
@arashsheyda Thanks for the PR and your patient 🙂 |
|
oh cool! thanks. checking it out now |
|
I just tested it out, looks awesome! |
|
@arashsheyda Oh did you close this PR? We still need it for changes inside components. |
|
oh shoot yes. I'll open another one sorry |



🔗 Linked issue
closes #9
❓ Type of change
📚 Description
Adds Vite DevTools integration via the separate
@comark/devtoolspackage, and fixes the React<Comark>component for client-side environments.Vite DevTools Integration
UI / RPC / host bridge live in
@comark/devtools(not insidecomark):@comark/vue/vitesoft-loads@comark/devtools/vitewhen installed — only needDevTools()+comark()comarkDevtoolsmanually (see examples)import { connectDevtools } from '@comark/devtools/host-client'This PR pins the pre-release via pkg.pr.new for development:
https://pkg.pr.new/comarkdown/comark-devtools/@comark/devtools@b168cd3Other changes
While working on the devtools I found a bug with the React example while Vite DevTools was enabled:
The fix makes
<Comark>no longer async so it works in both client and server contexts.Screen.Recording.2026-05-31.at.1.00.26.AM.mov
📝 Checklist
pnpm verifyand it passes.